OpenGL/ES: Fix 'R' and 'B' bits inverted on Windows
authorChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 31 Jul 2018 10:18:59 +0000 (18:18 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Thu, 30 Jul 2020 06:30:13 +0000 (14:30 +0800)
commitcf0175ffcec21ebc7b74c1fc44e74437e30af840
treec0f63430920c3c3e7ba8590aad492581e7d51b87
parente5600ab99b9fba4c8f37773ce4a599aea7ff2c67
OpenGL/ES: Fix 'R' and 'B' bits inverted on Windows

We need to use GL_BGRA instead of GL_RGBA when doing glReadPixels() on
EGL on Windows (ANGLE) so that the red and blue bits won't be displayed
inverted.

Also fix the logic where we determine whether to bit blit or redraw
everything.
gdk/gdkgl.c
gdk/gdkglcontext.c
gdk/gdkglcontextprivate.h
gdk/win32/gdkglcontext-win32.c